package com.myex.demo.dao;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.myex.demo.model.Goods;
import com.myex.demo.model.OrderMsg;
import com.myex.demo.model.OrderRecord;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface MiaoShaDao {

    List<Goods> findAllGoods();

    Goods findGoodsById(@Param("goodsId") String goodsId);

    int findGoodsStockById(@Param("goodsId") String id);

    List<OrderRecord> findOrderByUserIdAndGoodsId(@Param("userId") String userId, @Param("goodsId") String goodsId);

    Integer updateGoodsStock(@Param("goodsId") String goodsId, String num);

    Integer insertOrder(OrderMsg orderRecord);


}
